const Koa = require('koa')
const app = new Koa()
const userRouter = require('./router/user.js')
app.use((ctx, next) => {
  // ctx.response.body = 'hello world'
  next()
})
//  注册中间件
app.use(userRouter.routes()).use(userRouter.allowedMethods())
app.listen(6029, () => {
  console.log('koa初体验 server')
})